<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>组件</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
    <div id="example">
        <my-component></my-component>
    </div>


    <script>
        Vue.component('my-component',{
            template:'<div>A custom component!</div>'
        });
        new Vue({
            el:'#example'
        })
    </script>
</body>
</html>